-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable Continuous Queries #2200
Conversation
log.Println("broker cq: no topics currently available.") | ||
return // don't have any topics to get data urls from, give it up | ||
} | ||
dataURLs := topic.DataURLs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a strange way to get the URLs. :-) I know why a topic knows about the URLs, but is there no other way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add a convenience method to the broker which is something like:
func (b *Broker) DataURLs() ([]url.URL, bool)
And then we can hide some of this searching around.
There is no other way that a broker will know about data urls right now.
I'm not sure, but is the broker-only code only supposed run on the leader broker? |
@otoolep Only the leader broker should kick off CQ's, as we only want one person "directing traffic" with cq's. I don't think we have another way to schedule a unique job right now. Was that what you were asking? |
Yes, I want to make sure that we're still only kicking off the CQ from the leader. I don't think we did anything to affect that, but wanted to be sure. |
@otoolep correct, here are the lines that make sure that happens: https://github.com/influxdb/influxdb/blob/renenable-cq/broker.go#L68-L70 |
👍 |
…skipable Make client generation optional via ENV variable
This was previously removed due to the stateless broker refactoring. Now that brokers know about data nodes again, this was added back in.
Fixes #1666